package ai.people.netmon.framework.domain.archives.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.util.List;

/**
 * 说明
 *
 * @author zhenglin
 * @since 2022/4/1
 */
@Data
public class EsResult {
    /**
     * 列表
     */
    private List<Result> list;

    /**
     * 总计
     */
    private long total;
    /**
     * 页面
     */
    private long pages;
    /**
     * 当前
     */
    private long current;


    @Data
    public static class Result{
        private String id;
        private String ps;
        private String pubtime;
        private String sitename;
        private String source;
        private String title;
        private String url;
        private String content;
        private Group group;
        private Author author;
        private String tags;
        @JsonProperty("@timestamp")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private String timestamp;
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private String date;

        @Data
        public static class Group{
            private String id;
            private String name;
        }

        @Data
        public static class Author{
            private String id;
            private String name;
        }
    }


}
